﻿@{
    ViewBag.Title = "ViewPage1";
    Layout = "~/Views/Shared/BaseView.cshtml";
}
<script type="text/javascript">
    function showdiv3() {
        if (document.getElementById("table3").style.display == "block") {
            document.getElementById("table3").style.display = "none";
        } else {
            document.getElementById("table3").style.display = "block";
        }

    }
</script>
@{
    Common.Web.Cookie cookie = new Common.Web.Cookie();
    int visiterId = Convert.ToInt32(cookie.GetCookie("LoginUserId"));
    BenefitHelper.DB.DBManager db = new BenefitHelper.DB.DBManager();
    if (BenefitHelper.Sys.VisitPrower.HasAdminPrower(visiterId, db))
    { 
    <div id="buttons">
        <span>
            <p>
                <a href="/Init" target="_blank" title="后台管理">后台管理</a>
            </p>
        </span>
    </div>
    }
    db.Dispose();
}
<dl id="xiangmu">
    <dt><span id="title2">@ViewBag.company.CompanyName</span></dt>
    <dd>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" id="panzhongfenxi">
            <tr>
                <td style="border-left: 1px solid #ecc7b5;">
                    <a href="/Company/Index/1/@ViewBag.datequery">
                        <img src="/Content/images/icon_01.gif" />小组盈利 </a>
                </td>
                <td>
                    <a href="/CompanySort/Index/1/@ViewBag.pdate">
                        <img src="/Content/images/icon_09.gif" />公司排名</a>
                </td>
                <td class="selected">
                    <img src="/Content/images/icon_10.gif" />历史数据
                </td>
                <td>
                    <a href="/CompanyReport/Index/1/@ViewBag.pdate">
                        <img src="/Content/images/icon_05.gif" />报表</a>
                </td>
            </tr>
        </table>
    </dd>
</dl>
<div id="bigDataBox">
    <div class="date-select-bar">
        @for (int i = 1; i <= 12; i++)
        {
            if (!string.IsNullOrEmpty(ViewBag.querymonth.ToString()))
            {


                if (Convert.ToInt32(ViewBag.querymonth) == i)
                { 
            <a href="/CompanyHistory/Index/1/@ViewBag.queryyear@ViewBag.querymonth" class='cur'>@i</a>
                }
                else
                {
                    if (i < 10)
                    {
                        string z = "0" + i;
            <a href="/CompanyHistory/Index/1/@ViewBag.queryyear@z">@i</a>
                    }
                    else
                    {
            <a href="/CompanyHistory/Index/1/@ViewBag.queryyear@i">@i</a>
                    }

                }
            }
            else
            {
                if (i < 10)
                {
                    string z = "0" + i;
            <a href="/CompanyHistory/Index/1/@ViewBag.queryyear@z">@i</a>
                }
                else
                {
            <a href="/CompanyHistory/Index/1/@ViewBag.queryyear@i">@i</a>
                }

            }
        }
        @if (string.IsNullOrEmpty(ViewBag.querymonth.ToString()))
        {
            <a href="/CompanyHistory/Index/1/@ViewBag.queryyear" class='cur'>整年数据</a>
        }
        else
        {
            <a href="/CompanyHistory/Index/1/@ViewBag.queryyear">整年数据</a>
        }
    </div>
    <div class="date-select-bar" style="text-align: right; float: right;">
        @for (int i = 2011; i <= DateTime.Now.Year; i++)
        {
            if (Convert.ToInt32(ViewBag.queryyear) == i)
            {
            <a href="/CompanyHistory/Index/1/@i@ViewBag.querymonth" class='cur'>@i</a>
            }
            else
            {
            <a href="/CompanyHistory/Index/1/@i@ViewBag.querymonth">@i</a>
            }
        }
    </div>
    <br />
    <div style="height: 15px; line-height: 15px;">
    </div>
    <div style="width: 100%; height: 300px;" id="showflash">
    </div>
    <div style="height: 5px; line-height: 5px;">
    </div>
    <div class="statisticsTime">
        <div style="width: 100%; height: 300px;" id="showflash2">
        </div>
    </div>
    <div style="height: 15px; line-height: 15px;">
    </div>
    <div style="width: 60%; background-repeat: no-repeat; float: left; text-align: left;">
        <img src="/content/images/jiaoyitongji.png" />
    </div>
    <table cellspacing="0" cellpadding="0" class="list" style="width: 100%;" id="table1">
        <tr>
            <td class="title" style="text-align: center;">
                姓名
            </td>
            <td class="title">
                风险次数
            </td>
            <td class="title">
                资金利用率
            </td>
            <td class="title">
                胜率
            </td>
            <td class="title">
                涨幅
            </td>
            <td class="title">
                累计盈亏
            </td>
            <td class="title">
                每笔盈利
            </td>
            <td class="title">
                收益效率
            </td>
        </tr>
        @{
            double sum1 = 0;
            double sum2 = 0;
            double sum3 = 0;
            double sum4 = 0;
            double sum5 = 0;
            double sum6 = 0;
            double sum7 = 0;
            if (ViewBag.CompanyMonthSums != null)
            {
                foreach (BenefitHelper.Data.Year.GroupYearSum sum in ViewBag.groupmonthsums)
                {
                    sum1 += sum.RiskCount;
                    sum2 += sum.Utilization;
                    sum3 += sum.WinRate;
                    sum4 += sum.RaiseRate;
                    sum5 += sum.Profit;
                    sum6 += sum.AvgBillBenefit;
                    sum7 += sum.Yield;
            <tr>
                <td style="text-align: center;">
                    @sum.Group.GroupName
                </td>
                <td style="text-align: right;">
                    @sum.RiskCount
                </td>
                <td style="text-align: right;">
                    @sum.Utilization
                </td>
                <td style="text-align: right;">
                    @sum.WinRate
                </td>
                <td style="text-align: right;">
                    @sum.RaiseRate
                </td>
                <td style="text-align: right;">
                    @string.Format("{0:N2}", sum.Profit)
                </td>
                <td style="text-align: right;">
                    @string.Format("{0:N2}", sum.AvgBillBenefit)
                </td>
                <td style="text-align: right;" class="leftyes">
                    @sum.Yield
                </td>
            </tr>
                }
            }
            else
            {
                foreach (BenefitHelper.Data.Month.GroupMonthSum sum in ViewBag.groupmonthsums)
                {
                    sum1 += sum.RiskCount;
                    sum2 += sum.Utilization;
                    sum3 += sum.WinRate;
                    sum4 += sum.RaiseRate;
                    sum5 += sum.Profit;
                    sum6 += sum.AvgBillBenefit;
                    sum7 += sum.Yield;
            <tr>
                <td style="text-align: center;">
                    @sum.Group.GroupName
                </td>
                <td style="text-align: right;">
                    @sum.RiskCount
                </td>
                <td style="text-align: right;">
                    @sum.Utilization
                </td>
                <td style="text-align: right;">
                    @sum.WinRate
                </td>
                <td style="text-align: right;">
                    @sum.RaiseRate
                </td>
                <td style="text-align: right;">
                    @string.Format("{0:N2}", sum.Profit)
                </td>
                <td style="text-align: right;">
                    @string.Format("{0:N2}", sum.AvgBillBenefit)
                </td>
                <td style="text-align: right;" class="leftyes">
                    @sum.Yield
                </td>
            </tr>
                }
            }
            
        }
        <tr>
            <td style="text-align: center;" class="bottomyes">
                总计
            </td>
            <td style="text-align: right;" class="bottomyes">
                @sum1
            </td>
            <td style="text-align: right;" class="bottomyes">
                @sum2
            </td>
            <td style="text-align: right;" class="bottomyes">
                @sum3
            </td>
            <td style="text-align: right;" class="bottomyes">
                @sum4
            </td>
            <td style="text-align: right;" class="bottomyes">
                @string.Format("{0:N2}", sum5)
            </td>
            <td style="text-align: right;" class="bottomyes">
                @string.Format("{0:N2}", sum6)
            </td>
            <td style="text-align: right;" class="bottomyes leftyes">
                @sum7
            </td>
        </tr>
    </table>
    @if (ViewBag.CompanyMonthSums == null)
    {
        <div style="height: 15px; line-height: 15px;">
        </div>
        <div style="width: 60%; background-repeat: no-repeat; float: left; text-align: left;">
            <img src="/content/images/jiaoyigaikuang.png" />
        </div>
        <table style="width: 100%;" class="list" cellspacing="0" cellpadding="0">
            <tr>
                <td class="title" style="width: 10%;">
                    参数
                </td>
                <td class="title" style="width: 40%;">
                    值
                </td>
                <td class="title" style="width: 10%;">
                    参数
                </td>
                <td class="title" style="width: 40%;">
                    值
                </td>
            </tr>
            <tr class="detailsold" onclick="fee(1)">
                <td>
                    <div style="float: left; text-align: left; width: 100%;">
                        平仓盈亏</div>
                </td>
                <td style="padding: 1px 1px 1px 1px;">
                    <div class="div1" style="float: right; text-align: right; width: 100%;">
                        @string.Format("{0:N2}", ViewBag.change.Profit)</div>
                    <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table1">
                        <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                            <tr>
                                <td style="text-align: left; width: 25%;" rowspan="4">
                                    <div class="raise">
                                        @string.Format("{0:N2}", ViewBag.change.Profit)</div>
                                    <div style="color: #535985">
                                        本月
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left; padding-left: 10px; width: 25%; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.changemonth.Profit)</div>
                                    <div style="font-size: 8pt;">
                                        月均值</div>
                                </td>
                                <td style="text-align: left; padding-left: 10px; width: 25%; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.companyyearavg.Profit)</div>
                                    <div style="font-size: 8pt;">
                                        年均值</div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.changemonth2.Profit)</div>
                                    <div style="font-size: 8pt;">
                                        去年同期</div>
                                </td>
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.operatoryearsum.Profit)</div>
                                    <div style="font-size: 8pt;">
                                        年累计</div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
                <td>
                    <div style="float: left;">
                        手续费</div>
                </td>
                <td style="padding: 1px 1px 1px 1px;" class="leftyes">
                    <div style="float: right; text-align: right; width: 100%;" class="div1">
                        @string.Format("{0:N2}", ViewBag.change.Free)</div>
                    <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table1">
                        <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                            <tr>
                                <td style="text-align: left; width: 25%;" rowspan="4">
                                    <div class="raise">
                                        @string.Format("{0:N2}", ViewBag.change.Free)</div>
                                    <div style="color: #535985">
                                        本月
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left; padding-left: 10px; width: 25%; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.changemonth.Free)</div>
                                    <div style="font-size: 8pt;">
                                        月均值</div>
                                </td>
                                <td style="text-align: left; padding-left: 10px; width: 25%; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.companyyearavg.Free)</div>
                                    <div style="font-size: 8pt;">
                                        年均值</div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.changemonth2.Free)</div>
                                    <div style="font-size: 8pt;">
                                        去年同期</div>
                                </td>
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.operatoryearsum.Free)</div>
                                    <div style="font-size: 8pt;">
                                        年累计</div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
            <tr class="detailsold" onclick="fee(2)">
                <td>
                    <div style="float: left;">
                        净利润</div>
                </td>
                <td style="padding: 1px 1px 1px 1px;">
                    <div style="float: right; text-align: right; width: 100%;" class="div2">
                        @string.Format("{0:N2}", ViewBag.change.SumWin)</div>
                    <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table2">
                        <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                            <tr>
                                <td style="text-align: left; width: 25%;" rowspan="4">
                                    <div class="raise">
                                        @string.Format("{0:N2}", ViewBag.change.SumWin)</div>
                                    <div style="color: #535985">
                                        本月
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left; padding-left: 10px; width: 25%; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.changemonth.SumWin)</div>
                                    <div style="font-size: 8pt;">
                                        月均值</div>
                                </td>
                                <td style="text-align: left; padding-left: 10px; width: 25%; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.companyyearavg.SumWin)</div>
                                    <div style="font-size: 8pt;">
                                        年均值</div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.changemonth2.SumWin)</div>
                                    <div style="font-size: 8pt;">
                                        去年同期</div>
                                </td>
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.operatoryearsum.SumWin)</div>
                                    <div style="font-size: 8pt;">
                                        年累计</div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
                <td>
                    <div style="float: left;">
                        交易笔数</div>
                </td>
                <td style="padding: 1px 1px 1px 1px;" class="leftyes">
                    <div style="float: right; text-align: right; width: 100%;" class="div2">
                        @ViewBag.change.BillCount</div>
                    <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table2">
                        <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                            <tr>
                                <td style="text-align: left; width: 25%;" rowspan="4">
                                    <div class="raise">
                                        @ViewBag.change.BillCount</div>
                                    <div style="color: #535985">
                                        本月
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left; padding-left: 10px; width: 25%; background-color: #f5f7c7">
                                    <div>
                                        @ViewBag.changemonth.BillCount</div>
                                    <div style="font-size: 8pt;">
                                        月均值</div>
                                </td>
                                <td style="text-align: left; padding-left: 10px; width: 25%; background-color: #f5f7c7">
                                    <div>
                                        @ViewBag.companyyearavg.BillCount</div>
                                    <div style="font-size: 8pt;">
                                        年均值</div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @ViewBag.changemonth2.BillCount</div>
                                    <div style="font-size: 8pt;">
                                        去年同期</div>
                                </td>
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @ViewBag.operatoryearsum.BillCount</div>
                                    <div style="font-size: 8pt;">
                                        年累计</div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
            <tr class="detailsold" onclick="fee(3)">
                <td>
                    <div style="float: left;">
                        总亏损</div>
                </td>
                <td style="padding: 1px 1px 1px 1px;">
                    <div style="float: right; text-align: right; width: 100%;" class="div3">
                        @string.Format("{0:N2}", ViewBag.change.SumLost)</div>
                    <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table3">
                        <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                            <tr>
                                <td style="text-align: left; width: 25%;" rowspan="4">
                                    <div class="raise">
                                        @string.Format("{0:N2}", ViewBag.change.SumLost)</div>
                                    <div style="color: #535985">
                                        本月
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left; padding-left: 10px; width: 25%; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.changemonth.SumLost)</div>
                                    <div style="font-size: 8pt;">
                                        月均值</div>
                                </td>
                                <td style="text-align: left; padding-left: 10px; width: 25%; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.companyyearavg.SumLost)</div>
                                    <div style="font-size: 8pt;">
                                        年均值</div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.changemonth2.SumLost)</div>
                                    <div style="font-size: 8pt;">
                                        去年同期</div>
                                </td>
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.operatoryearsum.SumLost)</div>
                                    <div style="font-size: 8pt;">
                                        年累计</div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
                <td>
                    <div style="float: left;">
                        总盈利</div>
                </td>
                <td style="padding: 1px 1px 1px 1px;" class="leftyes">
                    <div style="float: right; text-align: right; width: 100%;" class="div3">
                        @string.Format("{0:N2}", ViewBag.change.SumWin)</div>
                    <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table3">
                        <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                            <tr>
                                <td style="text-align: left; width: 25%;" rowspan="4">
                                    <div class="raise">
                                        @string.Format("{0:N2}", ViewBag.change.SumWin)</div>
                                    <div style="color: #535985">
                                        本月
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left; padding-left: 10px; width: 25%; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.changemonth.SumWin)</div>
                                    <div style="font-size: 8pt;">
                                        月均值</div>
                                </td>
                                <td style="text-align: left; padding-left: 10px; width: 25%; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.companyyearavg.SumWin)</div>
                                    <div style="font-size: 8pt;">
                                        年均值</div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.changemonth2.SumWin)</div>
                                    <div style="font-size: 8pt;">
                                        去年同期</div>
                                </td>
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.operatoryearsum.SumWin)</div>
                                    <div style="font-size: 8pt;">
                                        年累计</div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
            <tr class="detailsold" onclick="fee(4)">
                <td class="bottomyes">
                    <div style="float: left;">
                        保证金占用</div>
                </td>
                <td style="padding: 1px 1px 1px 1px;" class="bottomyes">
                    <div style="float: right; text-align: right; width: 100%;" class="div4">
                        @string.Format("{0:N2}", ViewBag.change.UsedMargin)</div>
                    <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table4">
                        <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                            <tr>
                                <td style="text-align: left; width: 25%;" rowspan="4">
                                    <div class="raise">
                                        @string.Format("{0:N2}", ViewBag.change.UsedMargin)</div>
                                    <div style="color: #535985">
                                        本月
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left; padding-left: 10px; width: 25%; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.changemonth.UsedMargin)</div>
                                    <div style="font-size: 8pt;">
                                        月均值</div>
                                </td>
                                <td style="text-align: left; padding-left: 10px; width: 25%; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.companyyearavg.UsedMargin)</div>
                                    <div style="font-size: 8pt;">
                                        年均值</div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.changemonth2.UsedMargin)</div>
                                    <div style="font-size: 8pt;">
                                        去年同期</div>
                                </td>
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @string.Format("{0:N2}", ViewBag.operatoryearsum.UsedMargin)</div>
                                    <div style="font-size: 8pt;">
                                        年累计</div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
                <td class="bottomyes">
                    <div style="float: left;">
                        超出止损次数</div>
                </td>
                <td style="padding: 1px 1px 1px 1px;" class="leftyes bottom">
                    <div style="float: right; text-align: right; width: 100%;" class="div4">
                        @ViewBag.change.OverStopLoss</div>
                    <div style="width: 100%; display: none; padding: 1px 1px 1px 1px;" class="table4">
                        <table cellspacing="0" cellpadding="0" class="list2" style="width: 100%; background-color: #f5f7c7">
                            <tr>
                                <td style="text-align: left; width: 25%;" rowspan="4">
                                    <div class="raise">
                                        @ViewBag.change.OverStopLoss</div>
                                    <div style="color: #535985">
                                        本月
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left; padding-left: 10px; width: 25%; background-color: #f5f7c7">
                                    <div>
                                        @ViewBag.changemonth.OverStopLoss</div>
                                    <div style="font-size: 8pt;">
                                        月均值</div>
                                </td>
                                <td style="text-align: left; padding-left: 10px; width: 25%; background-color: #f5f7c7">
                                    <div>
                                        @ViewBag.companyyearavg.OverStopLoss</div>
                                    <div style="font-size: 8pt;">
                                        年均值</div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @ViewBag.changemonth2.OverStopLoss</div>
                                    <div style="font-size: 8pt;">
                                        去年同期</div>
                                </td>
                                <td style="text-align: left; padding-left: 10px; background-color: #f5f7c7">
                                    <div>
                                        @ViewBag.operatoryearsum.OverStopLoss</div>
                                    <div style="font-size: 8pt;">
                                        年累计</div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
        </table>
    }
    else
    {
        double num1 = 0;
        double num2 = 0;
        double num3 = 0;
        double num4 = 0;
        <div style="height: 15px; line-height: 15px;">
        </div>
        <div style="width: 60%; background-repeat: no-repeat; float: left; text-align: left;">
            <img src="/content/images/niandushujutongji.png" />
        </div>
        <table cellspacing="0" cellpadding="0" class="list" style="width: 100%;" id="timediv">
            <tr>
                <td class="title" style="text-align: center;">
                    月份
                </td>
                <td class="title" style="text-align: center">
                    平仓盈亏
                </td>
                <td class="title" style="text-align: center;">
                    手续费
                </td>
                <td class="title" style="text-align: center;">
                    净盈利
                </td>
                <td class="title" style="text-align: center;">
                    交易笔数
                </td>
            </tr>
            @foreach (BenefitHelper.Data.Month.CompanyMonthSum sum in ViewBag.CompanyMonthSums)
            {
                num1 += sum.Profit;
                num2 += sum.Free;
                num3 += sum.DayCount;
                num4 += sum.BillCount;
                <tr>
                    <td>
                        @sum.Month 月
                    </td>
                    <td>
                        @string.Format("{0:N2}", sum.Profit)
                    </td>
                    <td>
                        @string.Format("{0:N2}", sum.Free)
                    </td>
                    <td>
                        @string.Format("{0:N2}", sum.DayCount)
                    </td>
                    <td class="leftyes">
                        @sum.BillCount
                    </td>
                </tr>
            }
            <tr>
                <td class="bottomyes">
                    合计
                </td>
                <td class="bottomyes">
                    @string.Format("{0:N2}", num1)
                </td>
                <td class="bottomyes">
                    @string.Format("{0:N2}", num2)
                </td>
                <td class="bottomyes">
                    @string.Format("{0:N2}", num3)
                </td>
                <td class="bottomyes leftyes">
                    @num4
                </td>
            </tr>
        </table>
    }
    <div style="height: 5px; line-height: 5px;">
    </div>
</div>
@MvcHtmlString.Create(ViewBag.js)
<script type="text/javascript">
    YearBenefit();
    // MonthBenefit(1);
    function changeMonth(a) {
        MonthBenefit(a);
    }
</script>
<script type="text/javascript">
    DayShouyilv();
    function showorhidden() {
        $(".details").toggle();
    } function showDetail() {
        if ($('#ad').attr('class') == "detailsold") {
            $("#ad").removeClass("detailsold").addClass("detailsoldclick");
        } else {
            $("#ad").removeClass("detailsoldclick").addClass("detailsold");
        }
        $(".detailslist").toggle();
    }

    function fff() {
        $(".basehiddendiv").toggle();
        $(".aew").toggle();
        //    $(".detailsold").removeClass("detailsold").addClass("detailsoldclick");
    }

    function fsa(c) {
        var offset = $("#fs").offset();
        if (c == 1) {
            $("#myshowdiv").css("left", offset.left + 5);
            $("#myshowdiv").css("top", offset.top - 175);
        } else {
            $("#myshowdiv").css("left", offset.left - 545);
            $("#myshowdiv").css("top", offset.top - 175);
        }
        $("#myshowdiv").toggle();

    }
    function fee(id) {
        $(".div" + id).toggle();
        $(".table" + id).toggle();
    }
</script>
